import request from '@/utils/request'

// 查询区县人口和建筑物信息列表
export function getAllPeoBuildData(query) {
  return request({
    url: '/fxfzypg/baseData/getAllHosPeo',
    method: 'get',
    params: query
  })
}
// 查询乡镇街道人口和建筑物信息列表
export function getAllVillageTownHosPeo(query) {
  return request({
    url: '/fxfzypg/baseData/villageTown/getAllVillageTownHosPeo',
    method: 'get',
    params: query
  })
}
// 查询区县人口和建筑物信息详细
export function getPeoBuildData(id) {
  return request({
    url: '/fxfzypg/baseData/getHosPeoById/' + id,
    method: 'get'
  })
}
// 查询乡镇街道人口和建筑物信息详细
export function getVillageTownData(id) {
  return request({
    url: '/fxfzypg/baseData/villageTown/getVillageTownHosPeoById/' + id,
    method: 'get'
  })
}
// 添加区县人口和建筑物信息
export function saveBuildPeoData(data) {
  return request({
    url: '/fxfzypg/baseData/saveHosPeo',
    method: 'post',
    data: data
  })
}
// 添加乡镇街道人口和建筑物信息
export function saveVillageTownData(data) {
  return request({
    url: '/fxfzypg/baseData/villageTown/saveVillageTownHosPeo',
    method: 'post',
    data: data
  })
}
// 修改区县人口和建筑物信息
export function updateBuildPeoData(data) {
  return request({
    url: '/fxfzypg/baseData/updateHosPeo',
    method: 'post',
    data: data
  })
}
// 修改乡镇街道人口和建筑物信息
export function updateVillageTownData(data) {
  return request({
    url: '/fxfzypg/baseData/villageTown/updateVillageTownHosPeo',
    method: 'post',
    data: data
  })
}
// 删除区县人口和建筑物信息
export function delPeoBuildData(id) {
  return request({
    url: '/fxfzypg/baseData/deleteHosPeo/' + id,
    method: 'post'
  })
}
// 删除乡镇街道人口和建筑物信息
export function delVillageTownData(id) {
  return request({
    url: '/fxfzypg/baseData/villageTown/deleteVillageTownHosPeo/' + id,
    method: 'post'
  })
}

// 覆盖区县人口和建筑物信息
export function coverPeoBuildData(data) {
  return request({
    url: '/fxfzypg/baseData/cover',
    method: 'post',
    data:data
  })
}

// 覆盖乡镇街道人口和建筑物信息
export function coverVillageTownData(data) {
  return request({
    url: '/fxfzypg/baseData/villageTown/cover',
    method: 'post',
    data:data
  })
}